package edu.cmu.cs.webapp.ioms.dao;

import java.util.List;

import edu.cmu.cs.webapp.ioms.models.User;

/**
 * 
 * @author Christian
 * 
 */
public interface UserDAO {

	/**
	 * @return
	 */
	public List<User> getAllUsers() throws DataAccessException;

	/**
	 * Creates a new user in the database
	 * 
	 * @return
	 */
	public boolean addUser(User user) throws DataAccessException;

	/**
	 * Updates a new user in the database
	 * 
	 * @return
	 */
	public boolean updateUser(User user) throws DataAccessException;

	/**
	 * deletes a new user in the database
	 * 
	 * @return
	 */
	public boolean deleteUser(User user) throws DataAccessException;

	/**
	 * Finds a user with the specific login name, used for login check
	 * 
	 * @param login
	 * @return the user found, return null if not exist
	 * @throws DataAccessException
	 */
	public User findUser(String login) throws DataAccessException;

}
